<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WanDa</title>
<script type="text/javascript" src="/skin/WDYYhtml/js/jquery.js"></script>
<script type="text/javascript" src="/skin/WDYYhtml/js/common.js"></script>
<link rel="stylesheet" href="/skin/WDYYhtml/css/style.css" type="text/css" media="all" />
	<script type="text/javascript" src="/skin/WDYYhtml/js/jquery.grid-a-licious.min.js"></script>
</head>

<body>
<div class="header-wrapper">
	#parse('/inc/header.htm')
</div>

<!---->
<div id="Wrapper">
	<div class="wrapper">
		<!---->
		<div class="page-nav">
			<a href="/index.do">首页</a> / 
				#set($allTypes=$thisType.getParentTypes())
				#foreach($aType in $allTypes)
				<a href="$aType.getHref()">$aType.getName()</a> / 
				#end 
				<em>$!thisType.name</em></p>
			<!--<a href="#">首页</a> &gt; <a href="#">演出</a> &gt; <em>THE SHOW</em>-->
		</div>
		
		<!---->
		<div class="menu" id="pMenu">
			#set($arootType=$thisType.getRootType())
			#foreach($atype in $arootType.getSubTypes(1))
			<a href="$atype.href"
		    #if($atype.id.equals($thisType.id)) class="now"#end
		    >$atype.name</a>
			#end
		</div>		<div class="container">
			<div class="c2" id="Waterfall">
				
			</div>
		</div>
	</div>

	<div class="footer">
		<p></p>
		<p></p>
	</div>
</div>

<!---->
<div class="footer-wrapper">
	<div class="footer">
		#parse('/inc/nav.htm')
	</div>
</div>

<!---->
<div id="NavLeft"><a href="javascript:void(0)">Show</a></div>
<div id="NavRight"><a href="javascript:void(0)">Star</a></div>

<script type="text/javascript">
$(function(){
	fall(page);
})
var page = 1;
$(window).scroll(function(){
	var sT = document.documentElement.scrollTop || document.body.scrollTop;
	var pH = document.documentElement.clientHeight || document.body.clientHeight;
	var dH = $("#Wrapper").outerHeight();
	
	if(sT >= dH - pH){
		page++;
		fall(page);
	}
});

function fall(i){
	$.ajax({
		url:'/type.do?parameter=list&tid=$!thisType.id',
		data:{"page":i}
	}).done(function(data){
		var data = eval(data);
		var html = '',html2;
		var boxes = [];
		var div;
		$.each(data.list,function(i,item){
			html = '<div class="cell"><a href="'+item.links+'"><img src="'+item.img+'" alt="" /></a><div class="info"><h3><a href="'+item.links+'">'+item.title+'</a></h3><p class="p0"><a class="a0" href="#">微博</a><a class="a1" href="#">腾讯微博</a></p></div></div>';
			html2 += html;
			//$(html).appendTo($("#Waterfall"));
			div = $('<div></div>').addClass('cell');
			div.append(html);
			boxes.push(div);
		})
		
		if(i==1){
			$(html2).appendTo($("#Waterfall"));
			$("#Waterfall").gridalicious({
				width: 305,
				selector: '.cell',
				gutter: 0,
				animate: true,
				queue:true
			});
		}else{
			$("#Waterfall").gridalicious('append',boxes);
		}
	});
}
</script>
</body>
</html>
